package constant

// cache Ability && TimeOut && Type && Sync
const (
	CacheMinAbility    = 10
	CacheMaxAbility    = 400
	CacheNormalAbility = 2000

	CacheDefaultTimeOut = 300
	CacheDefaultLimit   = 300

	LocalCacheType         int = 0
	RedisCacheType         int = 1
	ForcedRefreshCacheType int = 99

	CacheSync   int = 0 //0: 同步更新(默认)；
	CacheASync  int = 1 //1: 异步更新；
	CacheNoSync int = 2 //2: 缓存不更新；

	ForcedRefreshLocalCacheType int = 99
	ForcedRefreshRedisCacheType int = 100

	SyncType   int = 0 //1: 异步更新；
	ASyncType  int = 1 //1: 异步更新；
	NoSyncType int = 2 //2: 缓存不更新；
)

// ExpireTime & limit
const (
	LocalCacheDefaultExpireTime = 10  // unit: s
	LocalCacheDefaultLimit      = 100 //
	LocalCacheMaxExpireTime     = 10  // unit: s
	LocalCacheMaxLimit          = 100 //

	RedisCacheDefaultExpireTime = 10  // unit: s
	RedisCacheDefaultLimit      = 100 //
	RedisCacheMaxExpireTime     = 10  // unit: s
	RedisCacheMaxLimit          = 100 //
)
